import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { WsGateway } from './gateway/ws.gateway';
import { loggingMiddleware, PrismaModule } from 'nestjs-prisma';
import { UsersModule } from './users/users.module';
import { AlgorithmModule } from './algorithm/algorithm.module';

@Module({
  imports: [
    PrismaModule.forRoot({
      isGlobal: true,
      prismaServiceOptions: {
        middlewares: [loggingMiddleware()],
      },
    }),
    UsersModule,
    AlgorithmModule,
  ],
  controllers: [AppController],
  providers: [AppService, WsGateway],
})
export class AppModule {}
